package cn.signalpha.modules.com.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 类说明
 *
 * @author signalpha
 */
@Getter
@AllArgsConstructor
public enum WalletAmountTypeEnum {

	/**
	 * 余额
	 */
	MONEY(1, "余额"),

	/**
	 * 积分
	 */
	INTEGRAL(2, "积分"),
	;

    private final Integer type;
	private final String name;

	public static WalletAmountTypeEnum instance(Integer type) {
		WalletAmountTypeEnum[] enums = values();
		for (WalletAmountTypeEnum statusEnum : enums) {
			if (statusEnum.getType().equals(type)) {
				return statusEnum;
			}
		}
		return null;
	}
}
